﻿using System;
using System.Collections.Generic;
using System.Text;
using AspNetCs.Model;
using AspNetCs.DALFactory;
using AspNetCs.SQLServerDAL;
using AspNetCs.IDAL;

namespace AspNetCs.Bll
{
    public class PartSiteConfigBLL
    {
        private IPartSiteConfig dal = Conn.CreatePartSiteConfig();
        /// <summary>
        /// 添加分站的配置
        /// </summary>
        /// <returns></returns>
        public int AddSiteConfig(PartSiteConfigModel model)
        {
            return dal.AddSiteConfig(model);
        }

        /// <summary>
        /// 修改分站的配置
        /// </summary>
        /// <returns></returns>
        public int UpdateSiteConfig(PartSiteConfigModel model)
        {
            return dal.UpdateSiteConfig(model);
        }

        /// <summary>
        /// 是否存在该分站的配置
        /// </summary>
        /// <param name="province"></param>
        /// <param name="city"></param>
        /// <returns></returns>
        public bool IsExistSiteConfig(int province, int city)
        {
            return dal.IsExistSiteConfig(province,city);
        }


        /// <summary>
        /// 是否存在该分站的配置
        /// </summary>
        /// <param name="province"></param>
        /// <param name="city"></param>
        /// <returns></returns>
        public PartSiteConfigModel GetModel(int province, int city)
        {
            return dal.GetModel(province,city);
        }
    }
}
